home *** CD-ROM | disk | FTP | other *** search
-
- P - L I S T P L U S
-
- by John K. Lunde
-
-
- P-LIST PLUS for the C128 is a BASIC listing utility that 'uncrunches'
- text, translates all those strange graphic characters into their real-world
- meanings, summarizes multiple entries and prints the results on titled and
- numbered pages. You can make listings in "reading" mode that show what the
- program will do, or in "entry" mode to show the exact keystrokes needed to
- enter it. Output can be to the printer or screen.
-
- FENDER'S NOTE: Since I use Jon Mattson's CONTROL80 in all my programs, and
- recommend it to everyone, I asked John Lunde to make sure P-LIST PLUS
- handles the extra commands that CONTROL80 provides. A day later, John sent
- me an upgrade that takes care of the tokens CONTROL 80 uses. My thanks to
- both Jo(h)ns!
-
-
- HOW TO USE P-LIST PLUS
- ----------------------
-
- If your printer has a skip-over-the-perforation feature or margin width
- controls, disable them; otherwise they'll conflict with P-LIST PLUS's own
- routines that do the same things.
-
- When you run P-LIST PLUS you'll see a title page displayed for a few
- seconds and then be instructed to insert the target disk. That's the disk
- that has the program or programs on it that you want to list. P-LIST PLUS
- should work on any type of drive numbered between 8 and 32.
-
- Insert it, press a key and a catalog of the disk's contents will
- shortly appear. If you discover you've loaded the wrong disk, enter a "d"
- and try again.
-
- To select a file for P-LISTing, move the pointer with the CRSR keys to
- the filename and press RETURN. You can use all four CRSR keys to move the
- pointer, or F7 and F5 to page forward or back if the directory is more than
- 64 titles long. The catalog will change pages automatically if you move the
- pointer above the first title or below the last.
-
- Even though the program is compiled, the directory read routine is not
- real fast. Be patient; even the longest directory will be read in less than
- 20 seconds.
-
- Selecting a filename takes you to the "formatter", where you can enter
- the output device, case, mode, width, title and range of lines to be listed.
- Default settings are already provided, so if you're happy with them all you
- have to do is press CRSR DOWN or RETURN until you're on the "List" line.
- Use RETURN on that line to start listing.
-
- To change any entry on the formatter, just type over it: if P-LIST
- can't handle your input, you'll be told that it's an "invalid entry". The
- length of the title is limited to the width of the listing or the width of
- the formatter line, whichever is shorter, and addresses for listing should
- be entered in the usual way.
-
- On the "Title" and "List" lines only, CLR clears the line; it has no
- effect on other lines. On the "List" line you can enter the range of line
- numbers you want listed (if you don't want to list the whole program). Just
- use the normal syntax (for example, 1200-1400 will list lines 1200 through
- 1400).
-
- You can go back to the catalog or read a new disk directory by entering
- C or D on the formatter. To quit, press Q.
-
- Once the listing's started, you can pause it at any time by pressing
- any key. To resume, press any key except F1; pressing F1 will take you back
- to the formatter.
-
- If you're listing to the printer, you'll be asked if you want to feed
- the form before you return to the formatter: P-LIST PLUS keeps track of the
- number of lines it's printed and after 54 lines advances the paper to start
- a new page. If you don't feed the form after the last line of a listing's
- been printed, this "line count" will be kept and the next listing will
- continue the same page -- even if you change target programs or list
- something to the screen between printings.
-
- If you decide not to feed the form and then change your mind once
- you're back at the formatter, press F7.
-
- Although P-LISTed programs read in a straightforward way, there are a
- few peculiarities you need to be aware of.
-
- * There are five instructions that the reading mode can't reduce to single
- meanings since their effects depend on the output device the target program
- uses. Two print as [FLASH ON/SGL. WIDTH] and [LWR CASE/DBL WIDTH]; in both
- cases, the screen effect is on the left and the printer effect is on the
- right.
-
- * The other three instructions are for color values that aren't the same on
- the 40 and 80 column screens. The 40 column color is on the left.
-
- * Where the CHR$ effect of a value is known, reading mode translates it:
- for instance, A$=CHR$(144) becomes A$=[BLK]. There are two values that have
- no CHR$ effect, though, and these are translated by the word BIN(ary), so
- that T$=CHR$(0) would P-LIST as T$=[BIN 0].
-
- * Reading mode also handles lines starting with REM in a special way: It
- removes the line number and the word REM before printing the text of the
- remark, which makes for a more readable listing. If a REM line is found
- within six lines of the bottom of the page, the form will be fed before the
- line is printed so that the remark and the following code will be printed on
- the same page.
-
- * Also, REMs that are at the end of a line are moved out to the right
- margin with a dashed line to make them more visible.
-
- * There are three things that can make P-LIST PLUS crash: first, some
- protection schemes and some word processor programs create filenames
- containing control characters. When P-LIST PLUS tries to list these names
- to the screen, they "print" as instructions that can make hash of the
- catalog. The only thing you can do about this is to transfer the programs
- you want to list to another disk and work from that.
-
- * Second, target programs can contain a subtle structural error: although
- such programs load and run normally, there are a few "glitch bytes" between
- the end of one line and the beginning of the next. P-LIST PLUS will list up
- to or partway through the "bad" line and then lock up. To fix this, LOAD
- the target program, LIST the problem line to the screen, put the cursor on
- it and press RETURN. This will clear the garbage out; reSAVE the target
- program and it should P-LIST normally.
-
- * Third, P-LIST PLUS only works on BASIC programs. If you try to list an
- ML program that has no BASIC lines, the program will probably lock up. All
- you can do is reset the computer and the drive.
-
- Take half an hour to play with P-LIST PLUS; after that, you'll have a
- good idea of how to use it. P-LIST PLUS is so user-friendly that there's no
- point in describing all its features; just assume that whatever you want to
- do is possible and try it. The worst that can happen is that the input will
- be ignored.
-
- JKL
-
- FENDER'S FINAL NOTE: Since we had room on this issue of LOADSTAR 128, we put
- the BASIC source code to P-LIST PLUS on the disk in a file called
- "pl-plus.bas". John's code is very readable and commented. Feel free to
- study it or modify it. The opening REM statements tell how to set the
- memory parameters in Abacus' BASIC 128 COMPILER before re-compiling. Choose
- option 3 (Advanced Development), then E for Memory. Then press 1 for Bank 0
- Start and enter 7168. Go back to the First Menu and choose option 1
- (P-Code).
-
- **** R - Run RETURN - Menu ****
-